package com.vst.orm.dao.hibernate;

import java.io.Serializable;
import java.util.List;

import com.vst.orm.search.ExampleOptions;
import com.vst.orm.search.Filter;
import com.vst.orm.search.ISearch;
import com.vst.orm.search.SearchResult;

public abstract interface GeneralDAO {
	public abstract <T> T find(Class<T> paramClass, Serializable paramSerializable);

	public abstract <T> T[] find(Class<T> paramClass, Serializable... paramVarArgs);

	public abstract <T> T getReference(Class<T> paramClass, Serializable paramSerializable);

	public abstract <T> T[] getReferences(Class<T> paramClass, Serializable... paramVarArgs);

	public abstract boolean save(Object paramObject);

	public abstract boolean[] save(Object... paramVarArgs);

	public abstract boolean remove(Object paramObject);

	public abstract void remove(Object... paramVarArgs);

	public abstract boolean removeById(Class<?> paramClass, Serializable paramSerializable);

	public abstract void removeByIds(Class<?> paramClass, Serializable... paramVarArgs);

	public abstract <T> List<T> findAll(Class<T> paramClass);

	public abstract List search(ISearch paramISearch);

	public abstract Object searchUnique(ISearch paramISearch);

	public abstract int count(ISearch paramISearch);

	public abstract SearchResult searchAndCount(ISearch paramISearch);

	public abstract boolean isAttached(Object paramObject);

	public abstract void refresh(Object... paramVarArgs);

	public abstract void flush();

	public abstract Filter getFilterFromExample(Object paramObject);

	public abstract Filter getFilterFromExample(Object paramObject, ExampleOptions paramExampleOptions);
}
